@extends('Admin.layout')
@section('content')

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
               公告管理
                <small>公告添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">公告管理</a></li>
                <li class="active">公告添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加公告</h3>
                        </div><!-- /.box-header -->


                        <!-- form start -->
                        <form role="form" method="post" action="{{ url('/admin/announce/insert')  }}"  >
                         {{ csrf_field() }}
                            <div class="box-body">

								@if (session('info'))
								<div class="alert alert-danger alert-dismissable">
								<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
								<h4><i class="icon fa fa-ban"></i> 提示!</h4>	
									<h4> {{ session('info') }}  </h4>
								</div>
								@endif



								@if (count($errors) > 0)
								<div class="alert alert-danger alert-dismissable">
								<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
								<h4><i class="icon fa fa-ban"></i> 警告!</h4>	
									<ol>
									@foreach ($errors->all() as $error)
									<li>{{ $error }}</li>
									@endforeach
									</ol>
								</div>
								@endif
								

                            	<div class="form-group">
                                    <label for="title">标题</label>
                                    <input type="text" class="form-control" id="title" value="{{ old('title') }}" name="title"  placeholder="请输入3-18标题">
                                </div>
                                
                                <div class="form-group" >
                                    <label for="content">内容</label>

                                <!-- 加载编辑器的容器 -->
                                <script id="container" name="content" type="text/plain"  style="height:200px;width:100% ">
                                
                                </script>
                                <!-- 配置文件 -->
                                <script type="text/javascript" src="{{ url('ue/ueditor.config.js') }}"></script>
                                <!-- 编辑器源码文件 -->
                                <script type="text/javascript" src="{{ url('ue/ueditor.all.js') }}"></script>
                                <!-- 实例化编辑器 -->
                                <script type="text/javascript">
                                var ue = UE.getEditor('container');
                                </script>
                                </div>
                                
                                
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">添加</button>
                                <button type="reset" class="btn btn-default">重置</button>
                            </div>

                        </form>
                    </div><!-- /.box -->


                    <!-- Input addon -->
                

                </div><!--/.col (left) -->
                <!-- right column -->
             
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->





@endsection